﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SetsItemAdd.aspx.cs" Inherits="UI.ModSalary.DefAccountSetItem" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>帐套的项目定义</title>
    <link rel="stylesheet" type="text/css" href="../Styles/BaseStyle.css" />
        <script type="text/javascript">
           
            function BtnClick(varChar) {
                var first = document.getElementById("txtCnFormula").value;
                document.getElementById("txtCnFormula").value = first + varChar;
            }
            function BtnClear() {
                var first2 = document.getElementById("txtCnFormula").value;
                document.getElementById("txtCnFormula").value = first2.substring(0, first2.length - 1);
            }



            function add() {
                var objres = document.getElementById("lstItems");

                for (var i = objres.options.length - 1; i >= 0; i--) {
                    if (objres.options[i].selected) { 
                    var first2 = document.getElementById("txtCnFormula").value;
                document.getElementById("txtCnFormula").value = first2 + objres.options[i].value;
                      
                        break;
                       
                     }
                }
               
                return false;
            } 


      </script> 
</head>
<body>
    <form id="form1" runat="server">
    <div id="pagetop" class="pagetop">
        <div class="pagetopleft">
            <b>定义工资项目</b></div>
    </div>
    <div style="margin-left: 80px">
        <table width="100%" border="0">
            <tr>
                <td>
                    方案： &nbsp;
                </td>
                <td>
                    <asp:DropDownList ID="ddlAccountSet" runat="server" CssClass="InputCss" Enabled="false">
                    </asp:DropDownList>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    序号： &nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtAbsIndex" Width="30px" runat="server" CssClass="InputCss">1</asp:TextBox>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td width="20%">
                    工资项目：&nbsp;
                </td>
                <td width="80%">
                    <asp:TextBox ID="txtItemName" runat="server" Width="100px" CssClass="InputCss"></asp:TextBox>&nbsp;
                    <asp:HiddenField ID="hidItemCode" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    项目类型：&nbsp;
                </td>
                <td>
                    <asp:DropDownList ID="ddlItemType" runat="server" CssClass="InputCss" AutoPostBack="True"
                        OnSelectedIndexChanged="ddlItemType_SelectedIndexChanged">
                        <asp:ListItem>输入项</asp:ListItem>
                        <asp:ListItem>计算项</asp:ListItem>
                        <asp:ListItem>所得税项</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    初始值： &nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtInitValue" Width="80px" runat="server" CssClass="InputCss">0</asp:TextBox>
                    &nbsp;
                    <asp:CheckBox ID="ckbInit" runat="server" Text="修改员工工资项初始值" />
                </td>
            </tr>
        </table>
        <asp:Panel ID="Panel1" runat="server" Visible="true">
            <table width="100%" border="0">
                <tr>
                    <td width="20%">
                        数据来源：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlSourceFrom" runat="server" CssClass="InputCss">
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" Visible="False">
            <table width="100%" border="0">
                <tr>
                    <td width="20%">
                        计算公式：
                    </td>
                    <td>
                        <asp:ListBox ID="lstItems" runat="server" CssClass="InputCss" Rows="15"></asp:ListBox>&nbsp;
                    </td>
                    <td>
                     <input id="btnSelect" type="button" value="选择"  class="InputCss" onclick='add();return false;' />
                        <input id="btnClear" type="button" value="清除" class="InputCss" onclick='BtnClear();return false;' /> <br />
                        <input id="btn1" type="button" value="+" class="InputCss" onclick='BtnClick("+");return false;' />
                        <input id="btn2" type="button" value="-" class="InputCss" onclick='BtnClick("-");return false;' />
                        <input id="btn3" type="button" value="*" class="InputCss" onclick='BtnClick("*");return false;' />
                        <input id="btn4" type="button" value="/" class="InputCss" onclick='BtnClick("/");return false;' />
                        <br />
                         <input id="Button1" type="button" value="1" class="InputCss" onclick='BtnClick("1");return false;' />
                          <input id="Button2" type="button" value="2" class="InputCss" onclick='BtnClick("2");return false;' />
                           <input id="Button3" type="button" value="3" class="InputCss" onclick='BtnClick("3");return false;' />
                            <input id="Button4" type="button" value="4" class="InputCss" onclick='BtnClick("4");return false;' /> <br />
                             <input id="Button5" type="button" value="5" class="InputCss" onclick='BtnClick("5");return false;' />
                              <input id="Button6" type="button" value="6" class="InputCss" onclick='BtnClick("6");return false;' />
                               <input id="Button7" type="button" value="7" class="InputCss" onclick='BtnClick("7");return false;' />
                                <input id="Button8" type="button" value="8" class="InputCss" onclick='BtnClick("8");return false;' /> <br />
                                 <input id="Button9" type="button" value="9" class="InputCss" onclick='BtnClick("9");return false;' />
                                  <input id="Button10" type="button" value="0" class="InputCss" onclick='BtnClick("0");return false;' />
                                   <input id="Button11" type="button" value="." class="InputCss" onclick='BtnClick(".");return false;' /><br />
                        <input id="btn5" type="button" value="(" class="InputCss" onclick='BtnClick("(");return false;' />
                        <input id="btn6" type="button" value=")" class="InputCss" onclick='BtnClick(")");return false;' />
                      
                    </td>
                    <td>
                        <asp:TextBox ID="txtCnFormula" runat="server" Rows="7" TextMode="MultiLine" Width="350px"
                            CssClass="InputCss"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <div style="margin-left: 100px">
            <asp:Button ID="btnAdd" runat="server" Text="增加" OnClick="btnAdd_Click" TabIndex="12" />
            &nbsp;<asp:Button ID="btnUpdate" runat="server" Text="更新" OnClick="btnUpdate_Click"
                TabIndex="13" Style="height: 21px" />
            &nbsp;<asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click" OnClientClick="return confirm('确定要删除吗?\n');"
                TabIndex="14" />
        </div>
    </div>
    </form>
</body>
</html>
